
null.o:     file format elf32-littlearm


Disassembly of section .text:

00000000 <main>:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main()
{
   0:	e92d4800 	push	{fp, lr}
   4:	e28db004 	add	fp, sp, #4
   8:	e24dd008 	sub	sp, sp, #8
	char *ptr;
	
	if ( (ptr = (char *)malloc(0)) == NULL)
   c:	e3a00000 	mov	r0, #0
  10:	ebfffffe 	bl	0 <malloc>
  14:	e1a03000 	mov	r3, r0  ; r3 = malloc 
  18:	e50b3008 	str	r3, [fp, #-8] ; ptr = malloc
  1c:	e51b3008 	ldr	r3, [fp, #-8] ; r3 = ptr
  20:	e3530000 	cmp	r3, #0
  24:	1a000002 	bne	34 <main+0x34>
		puts("Got a null pointer");
  28:	e59f0028 	ldr	r0, [pc, #40]	; 58 <main+0x58>
  2c:	ebfffffe 	bl	0 <puts>
  30:	ea000001 	b	3c <main+0x3c>
	else 
		puts("Got a valid pointer");	// right
  34:	e59f0020 	ldr	r0, [pc, #32]	; 5c <main+0x5c>
  38:	ebfffffe 	bl	0 <puts>
		
	ptr = "xiaozhi";
  3c:	e59f301c 	ldr	r3, [pc, #28]	; 60 <main+0x60>
  40:	e50b3008 	str	r3, [fp, #-8]   ; ptr
	printf("%s\n", ptr);
  44:	e51b0008 	ldr	r0, [fp, #-8] ; ptr
  48:	ebfffffe 	bl	0 <puts>
}
  4c:	e1a00003 	mov	r0, r3
  50:	e24bd004 	sub	sp, fp, #4
  54:	e8bd8800 	pop	{fp, pc}
  58:	00000000 	.word	0x00000000
  5c:	00000014 	.word	0x00000014
  60:	00000028 	.word	0x00000028
